<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><link rel="stylesheet" type="text/css" href="style.css" /><script type="text/javascript" src="highlight.js"></script></head><body><pre><span class="hs-pragma">{-# LANGUAGE Trustworthy #-}</span><span>
</span><span id="line-2"></span><span class="hs-pragma">{-# LANGUAGE NoImplicitPrelude #-}</span><span>
</span><span id="line-3"></span><span>
</span><span id="line-4"></span><span class="hs-comment">-----------------------------------------------------------------------------</span><span>
</span><span id="line-5"></span><span class="hs-comment">-- |</span><span>
</span><span id="line-6"></span><span class="hs-comment">-- Module      :  Text.Read</span><span>
</span><span id="line-7"></span><span class="hs-comment">-- Copyright   :  (c) The University of Glasgow 2001</span><span>
</span><span id="line-8"></span><span class="hs-comment">-- License     :  BSD-style (see the file libraries/base/LICENSE)</span><span>
</span><span id="line-9"></span><span class="hs-comment">--</span><span>
</span><span id="line-10"></span><span class="hs-comment">-- Maintainer  :  libraries@haskell.org</span><span>
</span><span id="line-11"></span><span class="hs-comment">-- Stability   :  provisional</span><span>
</span><span id="line-12"></span><span class="hs-comment">-- Portability :  non-portable (uses Text.ParserCombinators.ReadP)</span><span>
</span><span id="line-13"></span><span class="hs-comment">--</span><span>
</span><span id="line-14"></span><span class="hs-comment">-- Converting strings to values.</span><span>
</span><span id="line-15"></span><span class="hs-comment">--</span><span>
</span><span id="line-16"></span><span class="hs-comment">-- The &quot;Text.Read&quot; library is the canonical library to import for</span><span>
</span><span id="line-17"></span><span class="hs-comment">-- 'Read'-class facilities.  For GHC only, it offers an extended and much</span><span>
</span><span id="line-18"></span><span class="hs-comment">-- improved 'Read' class, which constitutes a proposed alternative to the</span><span>
</span><span id="line-19"></span><span class="hs-comment">-- Haskell 2010 'Read'.  In particular, writing parsers is easier, and</span><span>
</span><span id="line-20"></span><span class="hs-comment">-- the parsers are much more efficient.</span><span>
</span><span id="line-21"></span><span class="hs-comment">--</span><span>
</span><span id="line-22"></span><span class="hs-comment">-----------------------------------------------------------------------------</span><span>
</span><span id="line-23"></span><span>
</span><span id="line-24"></span><span class="hs-keyword">module</span><span> </span><span class="hs-identifier">Text.Read</span><span> </span><span class="hs-special">(</span><span>
</span><span id="line-25"></span><span>   </span><span class="annot"><span class="hs-comment">-- * The 'Read' class</span></span><span>
</span><span id="line-26"></span><span>   </span><span class="annot"><a href="GHC.Read.html#Read"><span class="hs-identifier">Read</span></a></span><span class="hs-special">(</span><span class="hs-glyph">..</span><span class="hs-special">)</span><span class="hs-special">,</span><span>
</span><span id="line-27"></span><span>   </span><span class="annot"><a href="Text.ParserCombinators.ReadP.html#ReadS"><span class="hs-identifier">ReadS</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-28"></span><span>
</span><span id="line-29"></span><span>   </span><span class="annot"><span class="hs-comment">-- * Haskell 2010 functions</span></span><span>
</span><span id="line-30"></span><span>   </span><span class="annot"><a href="Text.Read.html#reads"><span class="hs-identifier">reads</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-31"></span><span>   </span><span class="annot"><a href="Text.Read.html#read"><span class="hs-identifier">read</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-32"></span><span>   </span><span class="annot"><a href="GHC.Read.html#readParen"><span class="hs-identifier">readParen</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-33"></span><span>   </span><span class="annot"><a href="GHC.Read.html#lex"><span class="hs-identifier">lex</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-34"></span><span>
</span><span id="line-35"></span><span>   </span><span class="annot"><span class="hs-comment">-- * New parsing functions</span></span><span>
</span><span id="line-36"></span><span>   </span><span class="hs-keyword">module</span><span> </span><span class="annot"><a href="Text.ParserCombinators.ReadPrec.html"><span class="hs-identifier">Text.ParserCombinators.ReadPrec</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-37"></span><span>   </span><span class="annot"><a href="Text.Read.Lex.html#Lexeme"><span class="hs-identifier">L.Lexeme</span></a></span><span class="hs-special">(</span><span class="hs-glyph">..</span><span class="hs-special">)</span><span class="hs-special">,</span><span>
</span><span id="line-38"></span><span>   </span><span class="annot"><a href="GHC.Read.html#lexP"><span class="hs-identifier">lexP</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-39"></span><span>   </span><span class="annot"><a href="GHC.Read.html#parens"><span class="hs-identifier">parens</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-40"></span><span>   </span><span class="annot"><a href="GHC.Read.html#readListDefault"><span class="hs-identifier">readListDefault</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-41"></span><span>   </span><span class="annot"><a href="GHC.Read.html#readListPrecDefault"><span class="hs-identifier">readListPrecDefault</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-42"></span><span>   </span><span class="annot"><a href="Text.Read.html#readEither"><span class="hs-identifier">readEither</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-43"></span><span>   </span><span class="annot"><a href="Text.Read.html#readMaybe"><span class="hs-identifier">readMaybe</span></a></span><span>
</span><span id="line-44"></span><span>
</span><span id="line-45"></span><span> </span><span class="hs-special">)</span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-46"></span><span>
</span><span id="line-47"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Base.html"><span class="hs-identifier">GHC.Base</span></a></span><span>
</span><span id="line-48"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Read.html"><span class="hs-identifier">GHC.Read</span></a></span><span>
</span><span id="line-49"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="Data.Either.html"><span class="hs-identifier">Data.Either</span></a></span><span>
</span><span id="line-50"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="Text.ParserCombinators.ReadP.html"><span class="hs-identifier">Text.ParserCombinators.ReadP</span></a></span><span> </span><span class="hs-keyword">as</span><span> </span><span class="annot"><span class="hs-identifier">P</span></span><span>
</span><span id="line-51"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="Text.ParserCombinators.ReadPrec.html"><span class="hs-identifier">Text.ParserCombinators.ReadPrec</span></a></span><span>
</span><span id="line-52"></span><span class="hs-keyword">import</span><span> </span><span class="hs-keyword">qualified</span><span> </span><span class="annot"><a href="Text.Read.Lex.html"><span class="hs-identifier">Text.Read.Lex</span></a></span><span> </span><span class="hs-keyword">as</span><span> </span><span class="annot"><span class="hs-identifier">L</span></span><span>
</span><span id="line-53"></span><span>
</span><span id="line-54"></span><span class="hs-comment">------------------------------------------------------------------------</span><span>
</span><span id="line-55"></span><span class="hs-comment">-- utility functions</span><span>
</span><span id="line-56"></span><span>
</span><span id="line-57"></span><span class="hs-comment">-- | equivalent to 'readsPrec' with a precedence of 0.</span><span>
</span><span id="line-58"></span><span id="local-6989586621679494179"><span class="annot"><a href="Text.Read.html#reads"><span class="hs-identifier hs-type">reads</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Read.html#Read"><span class="hs-identifier hs-type">Read</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679494179"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">=&gt;</span><span> </span><span class="annot"><a href="Text.ParserCombinators.ReadP.html#ReadS"><span class="hs-identifier hs-type">ReadS</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679494179"><span class="hs-identifier hs-type">a</span></a></span></span><span>
</span><span id="line-59"></span><span id="reads"><span class="annot"><span class="annottext">reads :: forall a. Read a =&gt; ReadS a
</span><a href="Text.Read.html#reads"><span class="hs-identifier hs-var hs-var">reads</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int -&gt; ReadS a
forall a. Read a =&gt; Int -&gt; ReadS a
</span><a href="GHC.Read.html#readsPrec"><span class="hs-identifier hs-var">readsPrec</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="Text.ParserCombinators.ReadPrec.html#minPrec"><span class="hs-identifier hs-var">minPrec</span></a></span><span>
</span><span id="line-60"></span><span>
</span><span id="line-61"></span><span class="hs-comment">-- | Parse a string using the 'Read' instance.</span><span>
</span><span id="line-62"></span><span class="hs-comment">-- Succeeds if there is exactly one valid result.</span><span>
</span><span id="line-63"></span><span class="hs-comment">-- A 'Left' value indicates a parse error.</span><span>
</span><span id="line-64"></span><span class="hs-comment">--</span><span>
</span><span id="line-65"></span><span class="hs-comment">-- &gt;&gt;&gt; readEither &quot;123&quot; :: Either String Int</span><span>
</span><span id="line-66"></span><span class="hs-comment">-- Right 123</span><span>
</span><span id="line-67"></span><span class="hs-comment">--</span><span>
</span><span id="line-68"></span><span class="hs-comment">-- &gt;&gt;&gt; readEither &quot;hello&quot; :: Either String Int</span><span>
</span><span id="line-69"></span><span class="hs-comment">-- Left &quot;Prelude.read: no parse&quot;</span><span>
</span><span id="line-70"></span><span class="hs-comment">--</span><span>
</span><span id="line-71"></span><span class="hs-comment">-- @since 4.6.0.0</span><span>
</span><span id="line-72"></span><span id="local-6989586621679494175"><span class="annot"><a href="Text.Read.html#readEither"><span class="hs-identifier hs-type">readEither</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Read.html#Read"><span class="hs-identifier hs-type">Read</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679494175"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">=&gt;</span><span> </span><span class="annot"><a href="GHC.Base.html#String"><span class="hs-identifier hs-type">String</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Data.Either.html#Either"><span class="hs-identifier hs-type">Either</span></a></span><span> </span><span class="annot"><a href="GHC.Base.html#String"><span class="hs-identifier hs-type">String</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679494175"><span class="hs-identifier hs-type">a</span></a></span></span><span>
</span><span id="line-73"></span><span id="readEither"><span class="annot"><span class="annottext">readEither :: forall a. Read a =&gt; String -&gt; Either String a
</span><a href="Text.Read.html#readEither"><span class="hs-identifier hs-var hs-var">readEither</span></a></span></span><span> </span><span id="local-6989586621679494138"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679494138"><span class="hs-identifier hs-var">s</span></a></span></span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-74"></span><span>  </span><span class="hs-keyword">case</span><span> </span><span class="hs-special">[</span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679494137"><span class="hs-identifier hs-var">x</span></a></span><span> </span><span class="hs-glyph">|</span><span> </span><span class="hs-special">(</span><span id="local-6989586621679494137"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679494137"><span class="hs-identifier hs-var">x</span></a></span></span><span class="hs-special">,</span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;&quot;</span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">ReadPrec a -&gt; Int -&gt; ReadS a
forall a. ReadPrec a -&gt; Int -&gt; ReadS a
</span><a href="Text.ParserCombinators.ReadPrec.html#readPrec_to_S"><span class="hs-identifier hs-var">readPrec_to_S</span></a></span><span> </span><span class="annot"><span class="annottext">ReadPrec a
</span><a href="#local-6989586621679494135"><span class="hs-identifier hs-var">read'</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="Text.ParserCombinators.ReadPrec.html#minPrec"><span class="hs-identifier hs-var">minPrec</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679494138"><span class="hs-identifier hs-var">s</span></a></span><span> </span><span class="hs-special">]</span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-75"></span><span>    </span><span class="hs-special">[</span><span id="local-6989586621679494134"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679494134"><span class="hs-identifier hs-var">x</span></a></span></span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">a -&gt; Either String a
forall a b. b -&gt; Either a b
</span><a href="Data.Either.html#Right"><span class="hs-identifier hs-var">Right</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679494134"><span class="hs-identifier hs-var">x</span></a></span><span>
</span><span id="line-76"></span><span>    </span><span class="hs-special">[</span><span class="hs-special">]</span><span>  </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">String -&gt; Either String a
forall a b. a -&gt; Either a b
</span><a href="Data.Either.html#Left"><span class="hs-identifier hs-var">Left</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;Prelude.read: no parse&quot;</span></span><span>
</span><span id="line-77"></span><span>    </span><span class="annot"><span class="annottext">[a]
</span><span class="hs-identifier">_</span></span><span>   </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">String -&gt; Either String a
forall a b. a -&gt; Either a b
</span><a href="Data.Either.html#Left"><span class="hs-identifier hs-var">Left</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;Prelude.read: ambiguous parse&quot;</span></span><span>
</span><span id="line-78"></span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-79"></span><span>  </span><span id="local-6989586621679494135"><span class="annot"><span class="annottext">read' :: ReadPrec a
</span><a href="#local-6989586621679494135"><span class="hs-identifier hs-var hs-var">read'</span></a></span></span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-80"></span><span>    </span><span class="hs-keyword">do</span><span> </span><span id="local-6989586621679494128"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679494128"><span class="hs-identifier hs-var">x</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">ReadPrec a
forall a. Read a =&gt; ReadPrec a
</span><a href="GHC.Read.html#readPrec"><span class="hs-identifier hs-var">readPrec</span></a></span><span>
</span><span id="line-81"></span><span>       </span><span class="annot"><span class="annottext">ReadP () -&gt; ReadPrec ()
forall a. ReadP a -&gt; ReadPrec a
</span><a href="Text.ParserCombinators.ReadPrec.html#lift"><span class="hs-identifier hs-var">lift</span></a></span><span> </span><span class="annot"><span class="annottext">ReadP ()
</span><a href="Text.ParserCombinators.ReadP.html#skipSpaces"><span class="hs-identifier hs-var">P.skipSpaces</span></a></span><span>
</span><span id="line-82"></span><span>       </span><span class="annot"><span class="annottext">a -&gt; ReadPrec a
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679494128"><span class="hs-identifier hs-var">x</span></a></span><span>
</span><span id="line-83"></span><span>
</span><span id="line-84"></span><span class="hs-comment">-- | Parse a string using the 'Read' instance.</span><span>
</span><span id="line-85"></span><span class="hs-comment">-- Succeeds if there is exactly one valid result.</span><span>
</span><span id="line-86"></span><span class="hs-comment">--</span><span>
</span><span id="line-87"></span><span class="hs-comment">-- &gt;&gt;&gt; readMaybe &quot;123&quot; :: Maybe Int</span><span>
</span><span id="line-88"></span><span class="hs-comment">-- Just 123</span><span>
</span><span id="line-89"></span><span class="hs-comment">--</span><span>
</span><span id="line-90"></span><span class="hs-comment">-- &gt;&gt;&gt; readMaybe &quot;hello&quot; :: Maybe Int</span><span>
</span><span id="line-91"></span><span class="hs-comment">-- Nothing</span><span>
</span><span id="line-92"></span><span class="hs-comment">--</span><span>
</span><span id="line-93"></span><span class="hs-comment">-- @since 4.6.0.0</span><span>
</span><span id="line-94"></span><span id="local-6989586621679494165"><span class="annot"><a href="Text.Read.html#readMaybe"><span class="hs-identifier hs-type">readMaybe</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Read.html#Read"><span class="hs-identifier hs-type">Read</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679494165"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">=&gt;</span><span> </span><span class="annot"><a href="GHC.Base.html#String"><span class="hs-identifier hs-type">String</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Maybe.html#Maybe"><span class="hs-identifier hs-type">Maybe</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679494165"><span class="hs-identifier hs-type">a</span></a></span></span><span>
</span><span id="line-95"></span><span id="readMaybe"><span class="annot"><span class="annottext">readMaybe :: forall a. Read a =&gt; String -&gt; Maybe a
</span><a href="Text.Read.html#readMaybe"><span class="hs-identifier hs-var hs-var">readMaybe</span></a></span></span><span> </span><span id="local-6989586621679494122"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679494122"><span class="hs-identifier hs-var">s</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">String -&gt; Either String a
forall a. Read a =&gt; String -&gt; Either String a
</span><a href="Text.Read.html#readEither"><span class="hs-identifier hs-var">readEither</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679494122"><span class="hs-identifier hs-var">s</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-96"></span><span>                </span><span class="annot"><a href="Data.Either.html#Left"><span class="hs-identifier hs-type">Left</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-identifier">_</span></span><span>  </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Maybe a
forall a. Maybe a
</span><a href="GHC.Maybe.html#Nothing"><span class="hs-identifier hs-var">Nothing</span></a></span><span>
</span><span id="line-97"></span><span>                </span><span class="annot"><a href="Data.Either.html#Right"><span class="hs-identifier hs-type">Right</span></a></span><span> </span><span id="local-6989586621679494121"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679494121"><span class="hs-identifier hs-var">a</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">a -&gt; Maybe a
forall a. a -&gt; Maybe a
</span><a href="GHC.Maybe.html#Just"><span class="hs-identifier hs-var">Just</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679494121"><span class="hs-identifier hs-var">a</span></a></span><span>
</span><span id="line-98"></span><span>
</span><span id="line-99"></span><span class="hs-comment">-- | The 'read' function reads input from a string, which must be</span><span>
</span><span id="line-100"></span><span class="hs-comment">-- completely consumed by the input process. 'read' fails with an 'error' if the</span><span>
</span><span id="line-101"></span><span class="hs-comment">-- parse is unsuccessful, and it is therefore discouraged from being used in</span><span>
</span><span id="line-102"></span><span class="hs-comment">-- real applications. Use 'readMaybe' or 'readEither' for safe alternatives.</span><span>
</span><span id="line-103"></span><span class="hs-comment">--</span><span>
</span><span id="line-104"></span><span class="hs-comment">-- &gt;&gt;&gt; read &quot;123&quot; :: Int</span><span>
</span><span id="line-105"></span><span class="hs-comment">-- 123</span><span>
</span><span id="line-106"></span><span class="hs-comment">--</span><span>
</span><span id="line-107"></span><span class="hs-comment">-- &gt;&gt;&gt; read &quot;hello&quot; :: Int</span><span>
</span><span id="line-108"></span><span class="hs-comment">-- *** Exception: Prelude.read: no parse</span><span>
</span><span id="line-109"></span><span id="local-6989586621679494162"><span class="annot"><a href="Text.Read.html#read"><span class="hs-identifier hs-type">read</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Read.html#Read"><span class="hs-identifier hs-type">Read</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679494162"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">=&gt;</span><span> </span><span class="annot"><a href="GHC.Base.html#String"><span class="hs-identifier hs-type">String</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621679494162"><span class="hs-identifier hs-type">a</span></a></span></span><span>
</span><span id="line-110"></span><span id="read"><span class="annot"><span class="annottext">read :: forall a. Read a =&gt; String -&gt; a
</span><a href="Text.Read.html#read"><span class="hs-identifier hs-var hs-var">read</span></a></span></span><span> </span><span id="local-6989586621679494118"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679494118"><span class="hs-identifier hs-var">s</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(String -&gt; a) -&gt; (a -&gt; a) -&gt; Either String a -&gt; a
forall a c b. (a -&gt; c) -&gt; (b -&gt; c) -&gt; Either a b -&gt; c
</span><a href="Data.Either.html#either"><span class="hs-identifier hs-var">either</span></a></span><span> </span><span class="annot"><span class="annottext">String -&gt; a
forall a. String -&gt; a
</span><a href="GHC.Err.html#errorWithoutStackTrace"><span class="hs-identifier hs-var">errorWithoutStackTrace</span></a></span><span> </span><span class="annot"><span class="annottext">a -&gt; a
forall a. a -&gt; a
</span><a href="GHC.Base.html#id"><span class="hs-identifier hs-var">id</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">String -&gt; Either String a
forall a. Read a =&gt; String -&gt; Either String a
</span><a href="Text.Read.html#readEither"><span class="hs-identifier hs-var">readEither</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679494118"><span class="hs-identifier hs-var">s</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-111"></span></pre></body></html>